package com.zhu.fastFoodRestaurantOrderSystem.model;

import com.zhu.fastFoodRestaurantOrderSystem.model.enumType.OrderStatus;

import java.time.LocalDateTime;
import java.util.List;

// 订单类
public class Order {
    private String orderId;           // 订单ID
    private List<Item> items;         // 订单商品项
    private OrderStatus status;       // 订单状态
    private double totalPrice;        // 订单总金额
    private LocalDateTime createTime; // 订单创建时间
    private String remark;            // 订单备注
    private String changeRecord;      // 订单变化记录
    // 构造方法/getter/setter

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public List<Item> getItems() {
        return items;
    }

    public void setItems(List<Item> items) {
        this.items = items;
    }

    public OrderStatus getStatus() {
        return status;
    }

    public void setStatus(OrderStatus status) {
        this.status = status;
    }

    public double getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(double totalPrice) {
        this.totalPrice = totalPrice;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getChangeRecord() {
        return changeRecord;
    }

    public void setChangeRecord(String changeRecord) {
        this.changeRecord = changeRecord;
    }

    public Order() {
    }

    public Order(String orderId, List<Item> items, OrderStatus status, double totalPrice, LocalDateTime createTime, String remark) {
        this.orderId = orderId;
        this.items = items;
        this.status = status;
        this.totalPrice = totalPrice;
        this.createTime = createTime;
        this.remark = remark;
    }

    public Order(String orderId, List<Item> items, OrderStatus status, double totalPrice, LocalDateTime createTime, String remark, String changeRecord) {
        this.orderId = orderId;
        this.items = items;
        this.status = status;
        this.totalPrice = totalPrice;
        this.createTime = createTime;
        this.remark = remark;
        this.changeRecord = changeRecord;
    }

    @Override
    public String toString() {
        return "Order{" +
                "orderId='" + orderId + '\'' +
                ", items=" + items +
                ", status=" + status +
                ", totalPrice=" + totalPrice +
                ", createTime=" + createTime +
                ", remark='" + remark + '\'' +
                '}';
    }
}
